package com.googlecode.sparda.commons.collection.predicate;

import com.googlecode.sparda.commons.collection.ReentrantPredicate;

public class SamePredicate<T> implements ReentrantPredicate<T> {

	private final T t;
	
	public SamePredicate(T t) {
		this.t = t;
	}
	
	@Override
	public <TT extends T> boolean accept(TT t) {
		return this.t == t;
	}

	@Override
	public <TT extends T> boolean notAccept(TT t) {
		return this.t != t;
	}

	@Override
	public String getDescription() {
		return "Accept element based on \"==\" method.";
	}

	@Override
	public String getName() {
		return "Same Predicate";
	}
	
}
